package com.xinz.Android.Tool;

import java.io.InputStream;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import com.xinz.Android.Model.Spot;

public class SpotXMLParser {

	public static Spot parseXml(InputStream inputStream) throws Exception {
		SAXParserFactory spf = SAXParserFactory.newInstance();
		SAXParser sp = spf.newSAXParser();
		SpotXMLHandler handler = new SpotXMLHandler();
		sp.parse(inputStream, handler);
		return handler.getSpot();
	}
}
